<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 循环数组的length次
        var arr=[1,2,3,4];
        for(var i=0;i<arr.length;i++){
            console.log(arr[i]);
        }
        //循环多个数组
        var otherarr=[1,2,3,[4,5,6]];
        for(var j=0;j<(otherarr.length);j++){
            console.log(otherarr[j]);
            if(j==3){
                for(var s=0;s<otherarr[j].length;s++){
                    console.log(otherarr[j][s])
                }
            }
        }
        // 如何获取数组的最后一个值
        var arr=[1,2,3,5];
        console.log(arr[arr.length-1])
    </script>
</body>
</html>